<template>
	
	<view>
		<view class="">
			
			<p class="info" style="margin-top: 30%;">登录账号：
				<text class="text_info" style="color: orange;">{{user.loginName}}</text>
			</p>
			
			<p class="info"   >姓名： 
				<text class="text_info">{{user.userName}}</text>
			</p>
			
			<p class="info"   >手机号：
				<text class="text_info">{{user.mobile}}</text>
			</p>
			
			
			<p class="info"  style="">所属公司：
				<text class="text_info">{{user.dept.deptName}}</text>
			</p>
			
		</view>
		
		<view class="uni-btn-v" style="position: absolute;left: 15%;width: 70%;bottom: 30%;">
			<button type="primary" style="background-color: lightblue;" @click="unlogin">退出登录</button>
		</view>
	</view>
		
</template>

<script>
	export default {
			data() {
				return {
					title: 'Hello',
					deptId : uni.getStorageSync("deptId"),
					user:{}
				}
			},
			mounted() {
				console.log(this.deptId,'111111');
			},
			onLoad() {
	
			},
			onShow:function(e){
				this.$verify.verify();
				this.user = uni.getStorageSync("user");
				
			},
			// computed: {
			// 	getdeptid() {
			// 		return this.deptid
			// 	}
			// },
			methods: {
				unlogin(){
					var _this = this;
					uni.setStorageSync("user",null);
					// _this.$common.navigateTo('/pages/login/login');
					uni.reLaunch({ url: '/pages/login/login' })
					
				},
				go(url){
					if(url){
						uni.navigateTo({
						    url:url
						});
					}else{
						uni.navigateTo({
						    url:'/pages/dlplss/dlplss'
						});
					}
				}
			}
		}
	
</script>

<style>
	
	.info{
		text-align: left;
		margin-top: 8%;
		margin-left: 20%;
		font-size: 38rpx;
	}
	.text_info{
		color: darkgrey;
	}
</style>